﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TableAndColumn.ascx.cs" Inherits="UserControl_TableAndColumn" %>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
    DataTextField="TABLE_NAME" DataValueField="TABLE_NAME" AccessKey="t">
</asp:DropDownList>&nbsp;
<asp:Button ID="Button1" runat="server" AccessKey="a" OnClick="Button1_Click" Text="全選(a)" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MasertDB %>"
    SelectCommand="SELECT  *  FROM&#13;&#10;INFORMATION_SCHEMA.TABLES&#13;&#10;order by TABLE_NAME&#13;&#10;">
</asp:SqlDataSource>
<br />
<asp:CheckBoxList ID="CheckBoxList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2"
    DataTextField="COLUMN_NAME" DataValueField="COLUMN_NAME" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged"
    RepeatDirection="Horizontal" RepeatColumns="8">
</asp:CheckBoxList><asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MasertDB %>"
    SelectCommand="SELECT  *  FROM INFORMATION_SCHEMA.COLUMNS a WHERE table_name=@table_name ">
    <SelectParameters>
        <asp:ControlParameter ControlID="DropDownList1" Name="table_name" PropertyName="SelectedValue" />
    </SelectParameters>
</asp:SqlDataSource>
